package com.example.demo.mapper;

import com.example.demo.domain.SysbasePrimaryKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface SysbasePrimaryKeyMapper {
    //获取配置表的最大id
    public List<SysbasePrimaryKey> getListOrderbyIdDesc();

    //如果查询出的结果有多个，这时候会抛异常findByEntityName
    public SysbasePrimaryKey getOne(String entityName);

    //保存主键表
    public void save(SysbasePrimaryKey sysbasePrimaryKey);

    //更新主键表
    int updateByEntityNameAndLockTime(@Param("sysbasePrimaryKey") SysbasePrimaryKey sysbasePrimaryKey, @Param("currentTime") String currentTime);
}
